<template>
	<view>
		<view >
			<view class="headnav">发布内容</view>
		</view>
		<view class="conMain">
			<view class="conMain-lst">
				<view class="conTit">添加照片</view>
				<view class="cd-list">
					<view class="btAdd">
						<image src="../../static/add.png"></image>
					</view>
				</view>
			</view>
			<view class="conMain-lst">
				<view class="conTit">信息类型</view>
				<view class="cd-list">
					<view class="btnNa"
					 v-for="(item,index) in tabSele" 
					 :key="index"  
					 @click.stop="changeTab(index)" 
					 :class="{ 'tab-item-active': index == tabIndex }">{{item.text}}</view>
				</view>
			</view>
			<view class="conMain-lst">
				<view class="conTit">详细信息</view>
				<view class="cd-list">
					<view class="textare">
						<textarea placeholder="请输入你想发布的内容..."></textarea>
					</view>
				</view>
			</view>
		</view>
		<view class="my-fabu">
			<view class="btm">立即发布</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabIndex:0,
				tabSele:[{
					text:'农业科普'
				},{
					text:'农业新闻'
				},{
					text:'平台资讯'
				}],
			}
		}
	}
</script>

<style lang="scss" scoped>
.headnav{
	width: 100%;
	background-color: #fff;
	height: 99rpx;
	line-height: 99rpx;
	text-align: center;
	font-weight: 400;
	font-size: 31rpx;
	color: #333232;
}
.conMain{
	width: 95%;
	margin: 0 auto;
	background-color: #fff;
	border-radius: 10rpx;
	margin-top: 15rpx;
	padding: 20rpx;
	.conMain-lst{
		width: 95%;
		margin: 0 auto;
		.conTit{
			font-weight: 400;
			font-size: 31rpx;
			color: #333333;
			padding-left: 20rpx;
			position: relative;
			margin-top: 30rpx;
		}
		.cd-list{
			margin-top: 15rpx;
			overflow: hidden;
			width: 100%;
			.btAdd{
				float: left;
				width: 30%;
				height: 157rpx;
				margin-top: 15rpx;
				margin-left: 2%;
				image{
					width: 100%;
					height: 100%;
				}
			}
		}
	}
}
/* 竖线 */
.conTit:before {
  content: "";
  background-color: #FFA655;
  width: 3px;
  height: 18px;
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -9px;
  -webkit-border-radius: 3px;
  -moz-border-radius: 3px;
  border-radius: 3px;
}
.btnNa{
	float: left;
	width: 30%;
	line-height: 60rpx;
	background: #F2F2F2;
	border-radius: 30rpx;
	border: 1px solid #D9D9D9;
	margin-top: 15rpx;
	margin-left: 2%;
	text-align: center;
	font-size: 26rpx;
	color: #333333;
}
.tab-item-active{
	background-color: $main-color;
}
.textare{
	width:100%;
	height: 466rpx;
	background: #F2F2F2;
	border-radius: 10rpx;
	padding-top: 20rpx;
	textarea{
		width: 95%;
		height: 97%;
		margin: 0 auto;
		font-weight: 400;
		font-size: 26rpx;
		color: #A6A6A6;
	}
}
.my-fabu{
	margin-top: 35rpx;
	width: 100%;
	padding-bottom: 60rpx;
	.btm{
		width: 80%;
		margin: 0 auto;
		background-color: $main-color;
		text-align: center;
		height: 70rpx;
		line-height: 70rpx;
		font-weight: 400;
		font-size: 31rpx;
		color: #FFFFFF;
		border-radius: 25px;
	}
}
</style>